{layout name="public/layout" /}
<!--<link rel="stylesheet" href="https://css2020.yixuan.net/2020css/yx2020/css/bootstrap-select.min.css">-->
<!--<script type="text/javascript" src="https://css2020.yixuan.net/2020css/yx2020/js/bootstrap-select.min.js"></script>-->
<script type="text/javascript" src="/resource/js/underscore.min.js"></script>

<link rel="stylesheet" href="/resource/css/bootstrap-switch.min.css">
<script type="text/javascript" src="/resource/js/bootstrap-switch.min.js"></script>
{if $op == 'post'}

{/if}
{if $op == 'viewtuwen'}
<div class="main" style="margin: 0px 0;">
	{include file='yxnavbar'}
	<div class="panel panel-info">
		<div class="panel-body">

			<div class="form-group">
				<div class="col-sm-12 col-xs-12">
					{php echo view_ueditor('content', $tuwen);}
				</div>
			</div></div>

	</div>
</div>
{elseif $op == 'edit_type'}
	{include file='yxnavbar'}
	<form action="" method="post" class="form-horizontal" role="form">
		<input type="hidden" name="c" value="site" />
		<input type="hidden" name="a" value="entry" />
		<input type="hidden" name="m" value="{$_P['m']}" />
		<input type="hidden" name="do" value="{$do}" />
		<div class="panel panel-default" role="tabpanel" style="">
			<div class="panel-heading">软件标签</div>
			<div class="panel-body" style="">
				<div class="form-group">
					<label class="col-sm-2 col-xs-12 control-label">行业</label>
					<div class="col-sm-10 col-xs-12">
						{loop $softtaglist[0] $row}
						<label class="radio-inline">
							<input name="softtag0[]" type="checkbox" value="{$row}"
								   {if (strstr($config['softtag0'] . ",",$row .",")!==false )}
							checked
							{/if}
							> {$row}
						</label>
						{/loop}
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 col-xs-12 control-label">主题</label>
					<div class="col-sm-10 col-xs-12">
						{loop $softtaglist[1] $row}
						<label class="radio-inline">
							<input name="softtag1[]" type="checkbox" value="{$row}"
								   {if (strstr($config['softtag1'] . ",",$row .",")!==false )}
							checked
							{/if}
							> {$row}
						</label>
						{/loop}
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 col-xs-12 control-label">节日</label>
					<div class="col-sm-10 col-xs-12">
						{loop $softtaglist[2] $row}
						<label class="radio-inline">
							<input name="softtag2[]" type="checkbox" value="{$row}"
								   {if (strstr($config['softtag2'] . ",",$row .",")!==false )}
							checked
							{/if}
							> {$row}
						</label>
						{/loop}
					</div>
				</div>

			</div>
		</div>
		<div class="form-group" >
			<div class="col-sm-12">
				<input  name="submit" id="btnConfirm" type="submit" value="提交" class="btn btn-primary col-lg-3" style="width:120px;">
				<input type="hidden" name="__token__" value="{$Request.token}" />
				<span class="help-block col-lg-3"> 可按 ctrl+s 快速保存</span>
			</div>
		</div>
	</form>

	<script type="text/javascript">
		$(window).bind('keydown', function(event) {
			if (event.ctrlKey || event.metaKey) {
				switch (String.fromCharCode(event.which).toLowerCase()) {
					case 's':
						event.preventDefault();
						$("#btnConfirm").click()
						break;
				}
			}
		});
	</script>
{elseif $op == 'display'}
<style type="text/css">
	.title3{
		color: #3f8cfe;
	}
	.title4{
		color: #f25b9b;
	}
	.table-hover:first-child>tbody>tr:hover {
		background-color: white;
	}
</style>
<div class="main" style="margin: 0px 0;">
	{include file='yxnavbar'}
	{if !empty($timetxt)}
	<div class="panel panel-info" style="border-color: #f32a2a;">
		<div class="panel-heading" style="color:#ffffff;background: #f32a2a;border-color: #f32a2a;text-align: center;">{$timetxt}</div>
	</div>
	{elseif !empty($themetips)}
	<div class="panel panel-info" >
		<div class="panel-heading" style="text-align: center;">{$themetips}</div>
	</div>
	{/if}
	<div class="panel panel-info" >
		<div class="panel-heading">当前数量： {$total} {if ($_G['username']=='benben' || $_G['username']=='caiwu' || $_G['username']=='chuna') && $deltotal>0}
			<a href="{php echo createWebUrl('theme', array('op'=>'display','status'=>'-1'));}"  class="js-clip color-default" >【删除的活动：{$deltotal} 】</a>{/if}
			
		{if $is_del_all_setting}
		<a class="btn btn-warning" href="{php echo createWebUrl('theme', array('op'=>'del_all_setting'));}">重置后台所有配置</a>
		{/if}
		</div>
	</div>
	<div class="pull-right">
		{$pager}
	</div>
	<!-- 	<div class="panel panel-info">
		<div class="panel-heading">筛选</div>
		<div class="panel-body">
			<form action="./index.php" method="get" class="form-horizontal" role="form">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="{$_P['m']}" />
				<input type="hidden" name="do" value="{$do}" />
				<input type="hidden" name="themeid" value="{$id}" />
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">关键字</label>
					<div class="col-sm-6 col-md-6 col-lg-6 col-xs-12">
						<input type="text" class="form-control" name="keyword" value="{$_P['keyword']}" />
					</div>
					<div class="pull-left col-xs-12 col-sm-3 col-md-2 col-lg-2">
						<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
						<input type="hidden" name="__token__" value="{$Request.token}"/>
					</div>
				</div>
			</form>
		</div>
	</div> -->
	<div class="main">
		<table class="table bootstrap-table table-hover site-list">
			{if !empty($new_theme_cache)}
			<tr>
				<th colspan="2" class="text-left">活动名称 【{$softtips}】</th>
				<th class="text-left" width="160px">网址</th>
				<th class="text-left"></th>
				<th class="text-left" width="190px">数据【ID{php echo \app\model\Theme::getModuleName();}】</th>
				<th class="text-left" ></th>
				<th class="text-left" width="160px">操作</th>
			</tr>

			<tr>
				<td class="text-left vertical-middle" style="min-width: 120px;max-width: 160px">
					<div class="site-item-img1">
						<img src="{$new_theme_cache['bannerimgs'][0]}" width="100px" />
					</div>
				</td>
				<td class="text-left" style="max-width: 260px">
					<div class="bootstrap-margin-bottom" style="height: 40px;">
						<p class="color-gray">主标题</p>
						<span class="color-dark">{$new_theme_cache['title']}</span>
					</div>
					{if $modules[$row['id']]['system']['wxapp']==0 || $modules[$row['id']]['system']['softmode']!=1 }
					<div class="bootstrap-margin-bottom" style="height: 40px;">
						<p class="color-gray">副标题</p>
						<span class="color-dark">{$new_theme_cache['desc']}</span>
					</div>
					{/if}

				</td>
				<td class="text-left">
					<div class="bootstrap-margin-bottom" style="position: relative; text-align: center;">
						<img style="width: 159px;max-width: 159px;" src="https://css2020.yixuan.net/2020css/design/images/weifabu.png">
					</div>
				</td>
				<td class="text-left">
				</td>
				<td class="text-left">
					<p class="color-gray">参与人数：<span class="label label-primary">0</span></p>
					<p class="color-gray">浏  览  量：  <span class="label label-success">0</span></p>
					<p class="color-gray">转  发  量：  <span class="label label-info">0</span></p>
					<p class="color-gray">付款人数：<span class="label label-warning">0</span></p>
					<p class="color-gray">付款金额：<span class="label label-info">0元</span></p>
					{if $system['fenxiao']==1}
					<p class="color-gray">红包发放：<span class="label label-danger">0元</span></p>
					{/if}
					<p class="color-gray">实际到账：<span class="label label-success">0元</span></p>
				</td>
				<td ></td>
				<td class="text-left">
					<div style="height: 70px;">
					</div>
					<div class="bootstrap-margin-bottom">
						<a style="color:#666;"
						   href="{php echo createWebUrl($do, array('op'=>'del_theme_cache','ac'=>'del'));}"
						   title="删除">删除</a><br>
						{if empty($system['appid'])}
							<a class="btn btn-warning btn-sm" style="font-size: 16px;font-weight:bold"
						   href="{php echo createWebUrl('system',array('op' => 'display','themeid'=>$_P['themeid']));}"
						   title="参数设置"><i class="fa fa-edit">参数设置</i></a>
						{else}
							<a class="btn btn-success btn-sm" style="font-size: 16px;font-weight:bold"
						   href="{php echo createWebUrl($do, array('op'=>'post'));}"
						   title="发布"><i class="fa fa-edit"> 发布</i></a>
							{if $total>0}
							<a class="btn btn-warning btn-sm" style="font-size: 16px;font-weight:bold"
							   href="{php echo createWebUrl($do, array('op'=>'theme_replace'));}"
							   title="发布"><i class="fa fa-edit"> 替换上一个活动</i></a>
							{/if}
						{/if}
					</div>
				</td>
			</tr>
			<tr>
				<th colspan="7" class="text-right" style="color: #999999">
					店名：{$new_theme_cache['diqu']}<span class="title3">{$new_theme_cache['jubf']}</span>
					{if !empty($new_theme_cache['xiaoshou'])}销售：<span class="title3">{$new_theme_cache['xiaoshou']}</span>{/if}
				</th>
			</tr>
			<tr style="height: 30px;">
			</tr>
			{/if}
			{loop $list $row}
			<tr>
				<th colspan="2" class="text-left">活动名称 【{$softtips}】{$modules[$row['id']]['system']['version']}{$row['wxapp_name']}</th>
				<th class="text-left" width="160px">网址</th>
				<th class="text-left" {php echo $modules[$row['id']]['system']['wxapp']!=0 && $modules[$row['id']]['system']['softmode']==2?"width=\"160px\"":"";}></th>
				<th class="text-left" width="190px">数据【ID{php echo \app\model\Theme::getModuleName();}】</th>
				<th class="text-left" ></th>
				<th class="text-left" width="160px">操作</th>
			</tr>
			<tr>
				<td class="text-left vertical-middle" style="min-width: 120px;max-width: 160px">
					<div class="site-item-img1">
						<img src="{php echo tomedia(empty($row['headimg'])?$row['headlogo']:$row['headimg']);}" width="100px" />
					</div>
				</td>
				<td class="text-left" style="max-width: 260px">
					<div class="bootstrap-margin-bottom" style="height: 40px;">
						<p class="color-gray">主标题</p>
						<span class="color-dark">{$row['title']}</span>
					</div>
					{if $modules[$row['id']]['system']['wxapp']==0 || $modules[$row['id']]['system']['softmode']!=1 }
					<div class="bootstrap-margin-bottom" style="height: 40px;">
						<p class="color-gray">副标题</p>
						<span class="color-dark">{$row['desc']}</span>
					</div>
					{/if}
					<div class="">
						<p class="color-gray">时间</p>
						<a href="javascript:;" class="color-dark" >开始：{php echo date("Y-m-d H:i:s", $row['begintime']);}

							<br>
							结束：{php echo date("Y-m-d H:i:s", $row['endtime']);}</a>
					</div>
				</td>
				{if $modules[$row['id']]['system']['wxapp']==0 || $modules[$row['id']]['system']['softmode']!=1}
				<td class="text-left">
					<div class="bootstrap-margin-bottom" style="position: relative; text-align: center;">
						<img style="width: 159px;max-width: 159px;" src="{php echo createWebUrl('qr',array('url'=>$row['indexurl']));}">
						<span style="color: #999999">活动二维码{php echo \app\model\Theme::getModuleName();}</span><br>
						<a href="javascript:;" class="js-clip color-default" data-url="{$row['indexurl']}"  >复制活动链接</a>
					</div>
				</td>
				{/if}
				{if $modules[$row['id']]['system']['wxapp']!=0 && $modules[$row['id']]['system']['softmode']!=0}
				<td class="text-left">
					<div class="bootstrap-margin-bottom" style="position: relative; text-align: center;">
						<img style="width: 159px;max-width: 159px;" src="{$row['indexurlxcx']}">
						<span style="color: #999999">活动二维码{php echo \app\model\Theme::getModuleName();}</span>
					</div>
				</td>
				{/if}
				<!-- 	                <div class="">
	                   <p class="color-gray">活动状态</p>
	                   <input type="checkbox" name="status[]" data-id="{$row['id']}" value="{$row['status']}" class="hidden" {if intval($row['status'])==1} checked="checked" {/if}/>
	                </div> -->
				{if  $modules[$row['id']]['system']['softmode']!=2}
				<td ></td>
				{/if}
				<td class="text-left">
					<p class="color-gray">参与人数：<span class="label label-primary">{$row['fanscount']}</span></p>
					<p class="color-gray">浏  览  量：  <span class="label label-success">{$row['scansum']}</span></p>
					<p class="color-gray">转  发  量：  <span class="label label-info">{$row['forward']}</span></p>
					<p class="color-gray">付款人数：<span class="label label-warning">{$row['recordcount']}</span></p>
					<p class="color-gray">付款金额：<span class="label label-info">{$row['ordercount']}元</span></p>
					{if $modules[$row['id']]['system']['fenxiao']==1 || $row['commcount'] != 0}
					<p class="color-gray">红包发放：<span class="label label-danger">{$row['commcount']}元</span></p>
					{/if}
					{php $smsfee = \app\model\Sms::getUsedSmsTotal($row['id']);}
					{php $smsfee = $smsfee>0?$smsfee/10:0;}
					<p class="color-gray">短信通知：<span class="label label-danger">-{$smsfee}元</span></p>

					{if $row['mobile_check']>0 || $row['getmobile']>0}
					<a href="{php echo createWebUrl('fanslog', array('themeid'=>$row['id'],'op'=>'display','type'=>'36'));}">
						<p class="color-gray">手机验证：<span class="label label-danger">-{$row['mobile_check']}元</span></p>
					</a>
					{/if}
					{if ($row['endtime']>strtotime("-90 day")) || $row['viewbilltime']> TIMESTAMP || $_G['username']=='benben' }
					{if $row['chongzhi']>0 }
					<p class="color-gray">充&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;值：&nbsp;<span class="label label-success">{$row['chongzhi']}元</span></p>
					{elseif ($row['chongzhi']<0) }
					<p class="color-gray">已  提  现：  <span class="label label-success">{$row['chongzhi']}元</span></p>
					{/if}
					{php $daozhang = sprintf("%.2f",$row['ordercount']*$shouxu+$row['commcount']-$smsfee-$row['mobile_check']+$row['chongzhi']);}
					{php $daozhang = $daozhang<0.01 && $daozhang>-0.01?0:$daozhang;}
					<p class="color-gray">实际到账：<span class="label label-success">{$daozhang}元</span></p>  </td>
				{/if}
				<td ></td>
				<td class="text-left">
					{if $row['status'] != '-1'}
					<div style="line-height: 25px;">
						<p class="color-gray">管理</p>
						{if $_G['isSuperAdmin']}
						<a href="{php echo createWebUrl('system',array('op' => 'display','themeid'=>$row['id']));}" class="color-default bootstrap-margin-right" rel="tooltip"><i class="fa fa-reorder"></i> 参数设置</a><br>
						{/if}
						{if $modules[$row['id']]['system']['gift']==1 || $modules[$row['id']]['system']['fanpai']==1 }
						<a href="{php echo createWebUrl('giftgroup',array('op' => 'giftgroup','themeid'=>$row['id']));}" class="color-default bootstrap-margin-right" rel="tooltip"><i class="fa fa-reorder"></i> 礼品设置</a><br>
						{/if}
						{if $modules[$row['id']]['system']['live_lottery']==1}
						<a href="{php echo createWebUrl('clottery',array('op' => 'list','themeid'=>$row['id']));}" class="color-default bootstrap-margin-right" rel="tooltip" ><i class="fa fa-group"></i> 直播抽奖</a><br>
						{/if}
						{if (DOMAIN0 == "30.yixuan.net")}
							{if $row['is_upload_psd']==1}
							<a class="btn btn-info btn-sm" style="font-size: 12px;font-weight:bold"
							   href="{php echo createWebUrl('theme', array('op'=>'go_design','ac'=>'copy','themeid'=>$row['id']));}"
							   title="用此模版创建新活动"><i class="fa fa-image"> 用此模版创建新活动</i></a>
							{else}
							<a class="btn btn-warning btn-sm" style="font-size: 12px;font-weight:bold"
							   href="{php echo createWebUrl('theme', array('op'=>'go_design','ac'=>'upload','themeid'=>$row['id']));}"
							   title="上传PSD模版"><i class="fa fa-image"> 上传PSD模版</i></a>
							{/if}
							{if $modules[$row['id']]['system']['ispresale']==1}
								{if $row['presale_is_upload_psd']==1}
								<a class="btn btn-info btn-sm" style="font-size: 12px;font-weight:bold"
								   href="{php echo createWebUrl('theme', array('op'=>'go_design','ac'=>'copy','themeid'=>$row['id'],'presale'=>1));}"
								   title="用补款模版创建新活动"><i class="fa fa-image"> 用补款模版创建新活动</i></a>
								{else}
								<a class="btn btn-warning btn-sm" style="font-size: 12px;font-weight:bold"
								   href="{php echo createWebUrl('theme', array('op'=>'go_design','ac'=>'upload','themeid'=>$row['id'],'presale'=>1));}"
								   title="上传补款PSD模版"><i class="fa fa-image"> 上传补款PSD模版</i></a>
								{/if}
							{/if}
						{else}
							{if $modules[$row['id']]['system']['fenxiao']==1}
							<a href="{php echo createWebUrl('order', array('themeid'=>$row['id'],'op'=>'recharge'));}" class="color-default bootstrap-margin-right" rel="tooltip" ><i class="fa fa-usd"></i> 在线充值</a><br>
							{/if}
							{if $row['mobile_check']>0 || $row['getmobile']>0}
							<a href="{php echo createWebUrl('fanslog', array('themeid'=>$row['id'],'op'=>'display','type'=>'36'));}" class="color-default bootstrap-margin-right" rel="tooltip" ><i class="fa fa-mobile"></i> 手机验证</a><br>
							{/if}
							{if $_G['isSuperAdmin'] }
							<a href="{php echo createWebUrl($do, array('op'=>'edit_type','id'=>$row['id']));}" class="color-default bootstrap-margin-right" rel="tooltip" ><i class="fa fa-pencil-square-o"></i> 编辑标签</a><br>
							<a href="{php echo createWebUrl('bill', array('themeid'=>$row['id']));}" class="color-default bootstrap-margin-right" rel="tooltip" ><i class="fa fa-money"></i> 提现</a><br>
							{else}
							<a href="{php echo createWebUrl('bill', array('themeid'=>$row['id']));}" class="color-default bootstrap-margin-right" rel="tooltip" ><i class="fa fa-money"></i> 提现记录</a><br>
							{/if}
						{/if}
					</div>
					<div class="bootstrap-margin-bottom">
						<p class="color-gray">基础操作</p>
						<a class="btn btn-info btn-sm" style="font-size: 16px;font-weight:bold"
						   href="{php echo createWebUrl($do, array('op'=>'post','id'=>$row['id']));}"
						   title="编辑设置"><i class="fa fa-edit"> 活动编辑</i></a>
						{if $row['isautorefund']==1}
						<p class="color-gray"><span style="color: #5cc0de">提醒:此活动组团失败</span><span style="color: #d9534f">自动退款</span></p>
						{/if}
						{if $row['config']['colonel_auto_refund']==1}
						<p class="color-gray"><span style="color: #5cc0de"></span><span style="color: #d9534f">提醒:此活动已开启团满团长免单</span></p>
						{/if}
						{if empty($row['softsn']) || ($row['softsn_status']>0 && !$_G['isSuperAdmin'])}
						<p class="color-gray"><span style="color: #d9534f">软件未激活</span></p>
						{elseif $row['softsn']=='易宣软件测试专用'}
						<p class="color-gray"><span style="color: #d9534f">易宣软件测试专用</span></p>
						{elseif $row['softsn_status']>0 && $_G['isSuperAdmin']}
						<a class="btn btn-warning btn-sm" style="font-size: 16px;font-weight:bold"
						   href="{php echo createWebUrl('theme_softsn', array('op'=>'display','themeid'=>$row['id']));}"
						   title="{$softsn_tips[$row['softsn_status']]}"><i class="fa fa-check-square"> {$softsn_tips[$row['softsn_status']]}</i></a>
						{/if}
						{php echo \app\model\Theme::get_cert_status($modules[$row['id']]['system']);}
					</div>
					{elseif $row['status'] == '-1'}
					<div class="bootstrap-margin-bottom">
						<a class="btn btn-info btn-sm" style="font-size: 16px;font-weight:bold"
						   href="{php echo createWebUrl($do, array('op'=>'renew','id'=>$row['id']));}"
						   title="还原活动"><i class="fa fa-ren"> 还原</i></a>
						{if $_G['username']=='benben'}
						<a class="btn btn-warning btn-sm" style="font-size: 16px;font-weight:bold"
						   href="{php echo createWebUrl($do, array('op'=>'deleteben','id'=>$row['id']));}"
						   title="删除"><i class="fa fa-ren"> 完全删除</i></a>
						{/if}
					</div>
					
					{/if}
				</td>
			</tr>
			{if $_G['isSuperAdmin'] }
			<tr>
				<th colspan="7" class="text-right" style="color: #999999">{$row['keyword']}
					{if !empty($row['laoshi'])}策划：<span class="title4">{$row['laoshi']}</span>{/if}
					{if !empty($row['xiaoshou'])}销售：<span class="title3">{$row['xiaoshou']}</span>{/if}
					{if !empty($row['kefu'])} 客服：{$row['kefu']}{/if}
					{if $row['softsn_status']==0 && $_G['isSuperAdmin']}
					<a href="{php echo createWebUrl('theme_softsn', array('op'=>'display','themeid'=>$row['id']));}"
					   title="{$softsn_tips[$row['softsn_status']]}"><span style="color: #54c9e8">查看同地区活动</span></a>
					{/if}
				</th>
			</tr>
			{if $row['banmian']==1}
			<tr>
				<th colspan="7" class="text-center" style="background: #f67a7a;color: #fff">此设计版不可外发</th>
			</tr>
			{/if}
			{/if}
			<tr style="height: 30px;">
			</tr>
			{if $total==1}
			<tr>
				<th colspan="7" class="text-left"><span style="color: #d9534f">实际到账:</span><span style="color: #5cc0de">付款金额-{$shouxu100}%的手续费{if $modules[$row['id']]['system']['fenxiao']==1 || $row['commcount'] != 0}-红包发放{/if}-短信通知</span> 手续费:凡是通过微信支付的腾讯公司均收取,非我公司收取,详见:<a href="http://t.cn/R4zALPm" target="_blank">http://t.cn/R4zALPm</a></th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #d9534f">重要提示:严禁对客户讲因平台收钱不可退,一旦遭客户投诉被微信惩罚,您的款项可能会被暂时或永久扣押.</span></th>
			</tr>
			{/if}
			{/loop}
		</table>
		{$pager}
		{if $total>1}
		<table class="table bootstrap-table table-hover site-list">
			<tr>
				<th colspan="7" class="text-left"><span style="color: #d9534f">实际到账:</span><span style="color: #5cc0de">付款金额-{$shouxu100}%的手续费{if $modules[$row['id']]['system']['fenxiao']==1 || $row['commcount'] != 0}-红包发放{/if}</span> 手续费:凡是通过微信支付的腾讯公司均收取,非我公司收取,详见:<a href="http://t.cn/R4zALPm" target="_blank">http://t.cn/R4zALPm</a></th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #d9534f">重要提示:严禁对客户讲因平台收钱不可退,一旦遭客户投诉被微信惩罚,您的款项可能会被暂时或永久扣押.</span></th>
			</tr>
		</table>
		{/if}
		{if $_G['isSuperAdmin']}
		{include file='log'}
		{/if}
		{if $system['fenxiao']==1 || $row['commcount'] != 0}
		{php $colspan =9;}
		{else}
		{php $colspan =8;}
		{/if}
		{if $row['refundfee']>0}
		{php $colspan = $colspan+1;}
		{/if}
		{if DOMAIN0 != "30.yixuan.net" }
		<table class="table bootstrap-table table-hover site-list">
			{if $total>1}
			<tr><th colspan="{$colspan}" class="text-left panel-footer">{$row['title']}</th>
			</tr>
			{/if}
			<tr>
				<th class="text-left">日期</th>
				<th class="text-center" >新粉丝</th>
				<th class="text-center" >转发量</th>
				<th class="text-center" >浏览量</th>
				<th class="text-center" >付款人数</th>
				<th class="text-center" >付款金额</th>
				{if $system['fenxiao']==1 || $row['commcount'] != 0}
				<th class="text-center" >红包发放</th>
				{/if}
				<th class="text-center" >线下</th>
				{if $row['refundfee']>0}
				<th class="text-center" >退款数/金额</th>
				{/if}
				<th class="text-center" >操作</th>
			</tr>
			{loop $row['report'] $item}
			{php $riqi1 = $item['riqi'] . " 00:00:00";}
			{php $riqi2 = $item['riqi'] . " 23:59:59";}
			<tr>
				<td class="text-left">{$item['riqi']}</td>
				<td class="text-center" >{$item['newfans']}</td>
				<td class="text-center" >{$item['forward']}</td>
				<td class="text-center" >{$item['scansum']}</td>
				<td class="text-center" ><a
						href="{php echo createWebUrl('record', array('op'=>'display','themeid'=>$row['id'],'status'=>'1','createtime[start]'=>$riqi1,'createtime[end]'=>$riqi2));}"
				>{$item['record']}</a></td>
				<td class="text-center" ><a
						href="{php echo createWebUrl('order', array('op'=>'display','paystate'=>'1','themeid'=>$row['id'],'createtime[start]'=>$riqi1,'createtime[end]'=>$riqi2));}"
				>{$item['fee']}</a></td>
				{if $system['fenxiao']==1 || $row['commcount'] != 0}
				<td class="text-center" ><a
						href="{php echo createWebUrl('comm', array('op'=>'display','status'=>'1','themeid'=>$row['id'],'createtime[start]'=>$riqi1,'createtime[end]'=>$riqi2));}"
				>{$item['comm']}</a></td>
				{/if}
				<td class="text-center" ><a
						href="{php echo createWebUrl('comm', array('op'=>'display','status'=>'1','themeid'=>$row['id'],'createtime[start]'=>$riqi1,'createtime[end]'=>$riqi2));}"
				>{$item['recordxx']}</a></td>
				{if $row['refundfee']>0}
				<td class="text-center" ><a
						href="{php echo createWebUrl('record', array('op'=>'display','themeid'=>$row['id'],'status'=>'-1'));}"
				>{$item['refund']}/{$item['refundfee']}</a></td>
				{/if}
				<td class="text-right" ><a class="btn btn-info btn-sm"
										   href="{php echo createWebUrl('record', array('op'=>'display','status'=>'1','themeid'=>$row['id'],'createtime[start]'=>$riqi1,'createtime[end]'=>$riqi2));}"
				><i class="fa fa-list">查看明细</i></a></td>
			</tr>
			{/loop}
			<tr><td colspan="{$colspan}" class="text-center panel-footer">点击对应数字可查看对应明细</td>
			</tr>
		</table>
		{/if}
		<table class="table bootstrap-table table-hover site-list">
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">常用功能:</span>
					【增加虚人数】点击上方右侧->活动编辑->拉到最底部->修改参与人数/团/浏览量即可，或手机->虚拟数据</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">常用功能:</span>
					【导出数据】点击定单管理->选择想导出的条件(例如已支付的客户)->导出excel(如预到打开为乱码,请更换浏览器或电脑重试)</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f"><span style="color: #d9534f">手机修改虚拟数等</span>:</span>手机版可更活动常用设置以及活动虚拟数</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增修改定单:</span>客户填写的姓名电话以及其它表单均可以后台修改，员工，所属团也可修改，并形成修改日志</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f"><span style="color: #d9534f">手机版新增</span>:</span>团队日报，个人日报，数据统计，礼品统计，个人排名等多项功能</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增链接黑名单:</span>可限制同行等不想让其它看链接的打开我们活动链接</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f"><span style="color: #d9534f">全新的手机管理端上线</span>:</span>新增新粉丝概念，大屏投放，团队排名等所有功能进行重新改写</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增日报表功能:</span>系统自动统计活动每一天的，成交量，成交金额，红包发放，转发量以及每天的浏览量，通过走势给到领导层更好的决策，掌握活动的最新动向</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">选择套餐不同支付价格不同:</span>如婚纱照支付100元，写真照支付50元，儿童照支付50元，并且可以设置不同的分销红包</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de"><span style="color: #d9534f">裂变红包全面升级</span>:</span>手工发放，3小时成交量不够停发，3小时红包超过收入停发，地区限制新增GPS定位模式更加准确，大数据功能将已知刷红包的加入黑名单</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">弹幕开关:</span>点亮图标，分销红包，裂变红包，员工提成等弹幕可在后台其它设置，单独开关是否显示</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增<span style="color: #d9534f">虚拟红包排行榜</span>:</span>分销管理-红包排行榜-设置虚拟数，更快捷的让客户感受红包的魅力</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增翻牌游戏模式:</span>通过翻牌游戏让客户更多的参与感以及朋友圈裂变</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增邀请好友点亮图标:</span>邀请好友点亮图标，获得积分，再兑换对应的礼包，快速朋友圈裂变</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">优化二维码:</span>优化所有二维码及短网址,增加客户见证上的二维码开关,优化防封杀技术</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新软件:</span>
					<span style="color: #d9534f">【多商家异业联盟】</span>全新异业联盟模式,适合10家以上的多个异业模式,并且可以开三级分销</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增功能:</span>
					<span style="color: #d9534f">【虚拟成团】</span>客户没有组团成功,后台虚拟成团,功能:定单管理->虚拟成团</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增功能:</span>
					<span style="color: #d9534f">【2个拼团价】</span>比如3人团599元 5人团399元,如需使用联系客服即可</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增功能:</span>
					<span style="color: #d9534f">【个性化开关】</span>员工是否可查看团队排名,员工是否可支付,员工是否有分销红包,团队数量后台直接修改 </th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">优化裂变红包规则:</span>【新增规则】可限制客户要停留多久才可以参与,限制每小时的红包金额</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增功能:</span>
					<span style="color: #d9534f">【异业联盟+微团全面升级】</span>微团软件+异业联盟全面升级到最新版,拥有与拼多多软件一样的手机管理端以及电脑管理端,也同样可以拥有三级分销+摇一摇红包+员工提成</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增功能:</span>
					<span style="color: #d9534f">【摇一摇红包】</span>客户可以摇一摇获得红包,分享到朋友圈即可到账,快速朋友圈裂变</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增功能:</span>
					<span style="color: #d9534f">【线下定单录入】</span>大多数活动都是线上线下一起进行,很多客户进店成交后,碰到微信没钱等情况,无法在线支付.无法支付则就无法线上拉人组团,也就起不到更好的裂变.为此新增录入功能, 只需输入姓名和电话即可,提交后生成二维码,截屏发给客户扫描一下即可完成操作 </th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增功能:</span>
					【手机版定单管理】实现手机全面的管理,拥有电脑版的所有功能,可根据需要快速点击查询,更好的服务好客户和追单</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增功能:</span>
					【手机版团的管理】各种表格统计团的信息,谁和谁是一个团的,此团差几人,是每一个销售最痛苦的事情,现在打开手机管理后台,左侧为团左,右侧为团员,此团已有几人,差几人,一目了然,高效快捷</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增功能:</span>
					<span style="color: #d9534f">晒单系统(全网首创)</span>传统的定单,可以晒红包,晒转账,晒现金,现在所有定单转到线上后,没有了素材
					现在的我们手机管理后台,每成交一个定单系统都会自动生成定单图,图片上还带有员工的专属二维码,扫码即可进入活动链接,成交就为自个的定单.除此之外系统还可以自动生成虚拟定单,快速增加朋友圈热度</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增功能:</span>
					【手机版数据统计分析】实现所有数据的实时统计,已支付,未支付今天多少累计多少非常明白,直销(全网首创)有多少卡是自己直接销售的.整个团队多少,每个团队多少,本团队的每个小伙伴分别多少,并且会统计出这个每个员工的转发量和阅读量.</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增功能:</span>
					<span style="color: #d9534f">【24小时团购失败自动退款】</span>默认为关闭,如需开启,请联系工作人员</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增功能:</span>
					【新增后台退款功能】定单管理->每个定单里最右侧图标,可用于拍错或退单使用,需联系工作人员进行授权</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">修正BUG:</span>
					【红包失败重发机制】当遇到余额不足等情况发送失败时,系统自动重试</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">新增功能:</span>
					【按类型查询】定单管理/分销管理/交易记录按类型查询并且统计每个类型多少个,更利于活动推广</th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #71d24f">新增功能:</span>
					【快速查询定单】在定单管理,点击团号可快速查本团信息,点员工可查本员工信息 </th>
			</tr>
			<tr>
				<th colspan="7" class="text-left"><span style="color: #5cc0de">常用功能:</span>
					【员工业绩】菜单员工业绩,可快速查询员工名单以及转发量,阅读量,成交量等统计信息</th>
			</tr>
		</table>

	</div>

	<!-- 	<form action="" method="post" onsubmit="return formcheck(this)" id="form-activity">
	<div class="panel panel-default">
		<div class="panel-body table-responsive">
			<table class="table table-hover">
				<thead class="navbar-inner">
					<tr>
						<th style="width: 50px;">ID</th>
						<th>图标</th>
						<th>名称</th>
						<th>团长</th>
						<th>团员</th>
						<th>单买</th>
						<th>总计</th>
						<th>进账</th>
						<th>出账</th>
						<th>粉丝</th>
						<th>浏览</th>
						<th>转发</th>
						<th style="width: 200px; text-align: right;">操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $list $row}
					<tr>
						<td class="text-center">{$row['id']}</td>
						<td><img src="{php echo tomedia($row['img']);}" width="28" style="border-radius: 3px;"></td>
						<td style="font-size: 12px;max-width: 120px;">{$row['title']}</td>
						<td><span class="label label-primary">{$row['gsum1']}</span></td>
						<td><span class="label label-success">{$row['gsum2']}</span></td>
						<td><span class="label label-info">{$row['gsum9']}</span></td>
						<td><span class="label label-danger">{php echo $row['gsum1']+$row['gsum2']+$row['gsum9'];}</span></td>
						<td><span class="label label-success">{$row['ordercount']}</span></td>
						<td><span class="label label-warning">{$row['commcount']}</span></td>
						<td><span class="label label-success">{$row['fanssum']}</span></td>
						<td><span class="label label-warning">{$row['scansum']}</span></td>
						<td><span class="label label-info">{$row['forward']}</span></td>
						<td><input type="checkbox" name="status[]" data-id="{$row['id']}" value="{$row['status']}" class="hidden" {if intval($row['status'])==1} checked="checked" {/if}/></td>
						<td style="text-align: right;">
						  <a class="btn btn-success btn-sm" style="font-size: 16px;"
							href="{php echo createWebUrl($do, array('op'=>'post','id'=>$row['id']));}"
							title="编辑设置"><i class="fa fa-edit">活动编辑</i></a>

                        </td>
					</tr>
					{/loop}
				</tbody>
			</table>
		</div>
		{$pager}
	</div> -->
</div>

<script type="text/javascript">
	$(function(){
		$('.app-preview').click(function(){
			return false;
		});
		
			$(":checkbox[name='status[]']").bootstrapSwitch();
			$(':checkbox').on('switchChange.bootstrapSwitch', function(e, state){
				$this = $(this);
				var id = $(this).data('id');
				var status = this.checked ? 1 : 0;
				$.post("{php echo createWebUrl($do, array('op' => 'status'));}", {status:status,id: id}, function(resp){
					resp = $.parseJSON(resp);
					if(resp.message.errno != 0) {
						layer.msg('操作失败, 请稍后重试');
					} else {
						layer.msg('操作成功');
					}
				});
			});

		});
</script>
{else}{/if}

{if !empty($config['only_stu_data'])}
{include file='theme_stu'}
{/if}
<script type="text/javascript">
	function goto_url(url){
		$("#goto").val(url);
		$("#btnConfirm").click()
	}
	function formtwo_change() {
		var val = document.getElementById("formtwotype").value;
		var mut = document.getElementById('mut_formtwotype');
		var date = document.getElementById('date_formtwotype');
		if ( val ==2 || val ==3 ){
			mut.style.display = 'block';
			date.style.display = 'none';
		}else if ( val ==10 ){
			mut.style.display = 'none';
			date.style.display = 'block';
		}else{
			mut.style.display = 'none';
			date.style.display = 'none';
		}
	}
	function address_change() {
		var val = document.getElementById("addresstype").value;
		var mut = document.getElementById('mut_addresstype');
		if ( val ==2 || val ==3 ){
			mut.style.display = 'block';
		}else{
			mut.style.display = 'none';
		}
	}
	function shops_change() {
		var val = document.getElementById("shopstype").value;
		var mut = document.getElementById('mut_shopstype');
		var mut41 = document.getElementById('mut41_shopstype');
		var mut42 = document.getElementById('mut42_shopstype');
		if ( val == 0 || val == 3 || val == 4 || val == 5 ){
			mut.style.display = 'block';
		}else{
			mut.style.display = 'none';
		}
		if ( val ==4 ){
			mut41.style.display = 'block';
			mut42.style.display = 'block';
		}else{
			mut41.style.display = 'none';
			mut42.style.display = 'none';
		}
	}

	function presale_shops_change() {
		var val = document.getElementById("presale_shopstype").value;
		var mut = document.getElementById('presale_mut_shopstype');
		var mut41 = document.getElementById('presael_mut41_shopstype');
		var mut42 = document.getElementById('presale_mut42_shopstype');
		if ( val == 0 || val == 3 || val == 4 || val == 5 ){
			mut.style.display = 'block';
		}else{
			mut.style.display = 'none';
		}
		if ( val ==4 ){
			mut41.style.display = 'block';
			mut42.style.display = 'block';
		}else{
			mut41.style.display = 'none';
			mut42.style.display = 'none';
		}
	}

	$(window).bind('keydown', function(event) {
		if (event.ctrlKey || event.metaKey) {
			switch (String.fromCharCode(event.which).toLowerCase()) {
				case 's':
					event.preventDefault();
					$("#btnConfirm").click()
					break;
			}
		}
	});

	function drop_confirm(msg, url){
		if(confirm(msg)){
			window.location = url;
		}
	}

	var array = new Array(); //数组
	var arraylink = new Array(); //数组
	let arrOption = new Array();
	//js中的二维数组的下标可以使字符串
	{loop $musiclist $index $row}
	array['{$row['name']}'] = [{$row['listname']}];
	arraylink['{$row['name']}'] = [{$row['listlink']}];
	arrOption[{$index}] = {name: '{$row['name']}', list: [{$row['listname']}], url: [{$row['listlink']}]};
	{/loop}

		function flattenArr(arr = []) {
			return  arr.map(item => {
				return item.list.map((citem, cindex) => {
					return {id:`${item.name}-${cindex}`,name: item.name, link: citem, url: item.url[cindex]}
				})
			}).reduce((init, curr )=> {
				return init.concat(curr)
			}, [])
		}
		const musicArr =  flattenArr(arrOption);
		const str = musicArr.map((item, index) => {
			return `<option value="${item.id}">${item.link}</option>`
		}).join('');
		$('.selectpicker').append(str);
		$('.my-select').selectpicker();
		$('#selectMusic').change(function() {
			const val = $(this).val();
			if(val) {
				const filterData = musicArr.filter(item => item.id == val)[0];
				$('#musictype').val(filterData.name)
				var city = document.getElementById("musicname");
				city.options.length = 1;
				for(var p in array) {
					if(p == filterData.name) {
						//遍历每个省份的城市
						for(var c in array[p]) {
							//创建一个option
							var option = new Option(array[p][c], arraylink[p][c]);
							var city = document.getElementById("musicname");
							city.add(option);
						}
					}
				}
				$(city).val(filterData.url)
				$(".audio-player-media").val(filterData.url);
			}

		})
		//java:array[0] = {"",""};
		function initProvince() {
			for(var i in array) {
				var provinceObj = document.getElementById("musictype");
				//创建一个选项
				/**
				 * 参数一是：展示数据
				 * 参数二是：value属性的值
				 */
				var option = new Option(i, i); //jquery

				provinceObj.add(option); //把创建的option添加到下拉列表中
				{if $system['is_lz_game']=='1'}
				var provinceObj1 = document.getElementById("game_musictype");
				//创建一个选项
				/**
				 * 参数一是：展示数据
				 * 参数二是：value属性的值
				 */
				var option1 = new Option(i, i); //jquery

				provinceObj1.add(option1); //把创建的option添加到下拉列表中
				{/if}

				}
			}

			function changemusic() {
				var provinceName = document.getElementById("musictype").value;
				//得到第一个下拉列表的值
				var city = document.getElementById("musicname");
				//清空第二个下拉列表
				//方法一
				//city.innerHTML = "";
				//方法二
				city.options.length = 1;
				for(var p in array) {
					if(p == provinceName) {
						//遍历每个省份的城市
						for(var c in array[p]) {
							//创建一个option
							var option = new Option(array[p][c], arraylink[p][c]);
							var city = document.getElementById("musicname");
							city.add(option);
						}
					}
				}
			}
			//游戏使用
			function changegamemusic() {
				var provinceName = document.getElementById("game_musictype").value;
				//得到第一个下拉列表的值
				var city = document.getElementById("game_musicname");
				//清空第二个下拉列表
				//方法一
				//city.innerHTML = "";
				//方法二
				city.options.length = 1;
				for(var p in array) {
					if(p == provinceName) {
						//遍历每个省份的城市
						for(var c in array[p]) {
							//创建一个option
							var option = new Option(array[p][c], arraylink[p][c]);
							var city = document.getElementById("game_musicname");
							city.add(option);
						}
					}
				}
			}
			function changegamemusicname() {
				var musicname = document.getElementById("game_musicname").value;
				$(".audio-player-media").val(musicname);
			}
			//游戏使用结束
			function changemusicname() {
				var musicname = document.getElementById("musicname").value;
				$(".audio-player-media").val(musicname);
			}
			initProvince();


			{if $system['ispresale']==1}
			function presale_initProvince() {
				for(var i in array) {
					var provinceObj = document.getElementById("presale_musictype");
					//创建一个选项
					/**
					 * 参数一是：展示数据
					 * 参数二是：value属性的值
					 */
					var option = new Option(i, i); //jquery

					provinceObj.add(option); //把创建的option添加到下拉列表中

				}
			}

			function presale_changemusic() {
				var provinceName = document.getElementById("presale_musictype").value;
				//得到第一个下拉列表的值
				var city = document.getElementById("presale_musicname");
				//清空第二个下拉列表
				//方法一
				//city.innerHTML = "";
				//方法二
				city.options.length = 1;
				for(var p in array) {
					if(p == provinceName) {
						//遍历每个省份的城市
						for(var c in array[p]) {
							//创建一个option
							var option = new Option(array[p][c], arraylink[p][c]);
							var city = document.getElementById("presale_musicname");
							city.add(option);
						}
					}
				}
			}
			function presale_changemusicname() {
				var musicname = document.getElementById("presale_musicname").value;
				$(".audio-player-media").val(musicname);
			}
			presale_initProvince();
			{/if}

</script>
{if $op !='post'}

{/if}
